import socket


def get_local_ip():
    """
    获取当前计算机的IP地址
    """
    return socket.gethostbyname(socket.gethostname())

# 服务端口
SERVICE_PORT=8000
SERVICE_IP=get_local_ip()
SERVICE_NAME="ocr-service"
# Nacos 配置
# NACOS_SERVER_ADDRESS= "www.aigc3d.com:8848"
# NACOS_NAMESPACE= "aigc"
# NACOS_DATA_ID = "ocr-service"
# NACOS_USERNAME = "nacos"
# NACOS_PASSWORD = "nacos"
# NACOS_GROUP_NAME = "aigc"

NACOS_SERVER_ADDRESS = "www.aigc3d.com:8848"
NACOS_NAMESPACE = "public"
NACOS_DATA_ID = "ocr-service"
NACOS_USERNAME = "nacos"
NACOS_PASSWORD = "nacos"
NACOS_GROUP_NAME = "DEFAULT_GROUP"



# 语言属性
LANG = "ch"  # 例如：中文

def set_lang(new_lang):
    """
    设置OCR模型语言属性
    :param new_lang: 新的语言属性
    """
    print("设置OCR模型语言属性为：", new_lang)
    global LANG
    LANG = new_lang
